/*
 * @Author: your name
 * @Date: 2020-12-18 09:54:44
 * @LastEditTime: 2021-02-04 13:49:29
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \web-node-service\routes\login.js
 */
const router = require('koa-router')();
const {usersModel} = require('../model/users');

router.post('/login', async (ctx) => {
	await usersModel.login(ctx);
});
router.post('/edit/user', async (ctx) => {
	await usersModel.editUser(ctx);
});

router.get('/user', async (ctx) => {
	await usersModel.getUsers(ctx);
});

router.post('/del/user', async (ctx) => {
	await usersModel.delUser(ctx);
});
router.post('/add/attention', async (ctx) => {
	await usersModel.addAttention(ctx);
});
router.post('/quit/attention', async (ctx) => {
	await usersModel.quitAttention(ctx);
});
router.get('/user/info', async (ctx) => {
	await usersModel.getUsersInfo(ctx);
});

module.exports = router;
